package com.mooc.lib_find.bind

import androidx.databinding.BindingAdapter
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.mooc.lib_find.adapter.FindListAdapter

class FindRvBind {

    companion object{
        @JvmStatic
        @BindingAdapter("findAdapter")
        fun findRecyclerViewBind(rv : RecyclerView,findAdapter : FindListAdapter){
            val manager = LinearLayoutManager(rv.context)
            manager.orientation = LinearLayoutManager.VERTICAL
            rv.layoutManager = manager
            rv.adapter = findAdapter
        }
    }

}